package com.oocl.euc.core.requestform.model;

import com.oocl.euc.audit.AuditEntity;

import javax.persistence.*;
import java.util.List;

@Entity
@Table(name = "PCRS_REQUEST_REMARKS")
@SequenceGenerator(name = "SEQUENCE_GENERATOR", sequenceName = "REQUEST_REMARKS_SEQUENCE", allocationSize = 1)
public class RequestRemarks extends AuditEntity {
    @Column(name = "POST_FROM")
    private String sender;

    @Column(name = "POST_TO")
    private String receiver;

    @Column(name = "REF_NO")
    private String refNo;

    @Column(name = "DISPLAY_NAME")
    private String displayName;

    @Column(name = "POST_CC")
    private String sendToCC;

    @Lob
    @Column(name = "DESCRIPTION", columnDefinition = "CLOB")
    private String description;

    @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
    @JoinColumn(name = "REMARKS_ID", referencedColumnName = "ID")
    private List<RequestRemarksAttach> requestRemarksAttachList;

    public String getSender() {
        return sender;
    }

    public void setSender(String sender) {
        this.sender = sender;
    }

    public String getReceiver() {
        return receiver;
    }

    public void setReceiver(String receiver) {
        this.receiver = receiver;
    }

    public String getRefNo() {
        return refNo;
    }

    public void setRefNo(String refNo) {
        this.refNo = refNo;
    }

    public String getDisplayName() {
        return displayName;
    }

    public void setDisplayName(String displayName) {
        this.displayName = displayName;
    }

    public String getSendToCC() {
        return sendToCC;
    }

    public void setSendToCC(String sendToCC) {
        this.sendToCC = sendToCC;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public List<RequestRemarksAttach> getRequestRemarksAttachList() {
        return requestRemarksAttachList;
    }

    public void setRequestRemarksAttachList(List<RequestRemarksAttach> requestRemarksAttachList) {
        this.requestRemarksAttachList = requestRemarksAttachList;
    }
}
